<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>
<head>
  <title>generate_migrations (MessageableGenerator)</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
  <pre><span class="ruby-comment cmt"># File generators/messageable/messageable_generator.rb, line 21</span>
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">generate_migrations</span>(<span class="ruby-identifier">recorder</span>, <span class="ruby-identifier">names</span>)
      <span class="ruby-identifier">names</span> = <span class="ruby-identifier">names</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Array</span>) <span class="ruby-operator">?</span> <span class="ruby-identifier">names</span> <span class="ruby-operator">:</span> [<span class="ruby-identifier">names</span>]
      <span class="ruby-identifier">names</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">n</span><span class="ruby-operator">|</span>
        <span class="ruby-identifier">recorder</span>.<span class="ruby-identifier">migration_template</span> <span class="ruby-node">&quot;migrate/#{n}.rb&quot;</span>, <span class="ruby-value str">&quot;db/migrate&quot;</span>, <span class="ruby-identifier">:migration_file_name</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">n</span>
      <span class="ruby-keyword kw">end</span>
    <span class="ruby-keyword kw">end</span></pre>
</body>
</html>